﻿//
// Created: 2018/7/15
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.WeiXin;

namespace Model.WeiXin.Map
{
    internal  class WeiXinTokenMap:EntityTypeConfiguration<WeiXinToken>    
    {
        public WeiXinTokenMap()
        {
             this.ToTable("WeiXin_Token");
             this.HasKey(i => new { i.AppID });
             this.Property(i => i.AppID).HasColumnName("ID");                     
             this.Property(i => i.TokenValue).HasColumnName("TokenValue");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.ExprieTime).HasColumnName("ExprieTime");                     
             this.Property(i => i.State).HasColumnName("State");                     
             this.Property(i => i.Source).HasColumnName("Source");                     
             this.Property(i => i.SiteName).HasColumnName("SiteName");                     
        }   
    }
    
     public static class WeiXinTokenMapExtensions
    {
        public static void UserWeiXinTokenMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new WeiXinTokenMap());
        }
    }
}